package com.nexus.all.dto;

import com.nexus.bean.annotation.valid.AddGroup;
import com.nexus.bean.annotation.valid.OtherGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotBlank;

/**
 * @author zxt
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel("用户登录对象入参")
public class LoginBodyDTO {

    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    @NotBlank(message = "验证码不能为空", groups = {OtherGroup.class, AddGroup.class})
    private String username;

    /**
     * 用户密码
     */
    @ApiModelProperty("用户密码")
    @NotBlank(message = "验证码不能为空", groups = AddGroup.class)
    private String password;

    /**
     * 验证码
     */
    @ApiModelProperty("验证码")
    @NotBlank(message = "验证码不能为空", groups = OtherGroup.class)
    private String code;

    /**
     * 唯一标识
     */
    @ApiModelProperty("唯一标识")
    private String uuid = "";

}
